Skip to content

[Windows] Fix Modal page has a 32px title bar gap at the top in full-screen mode - #36209

Merged
kubaflo merged 12 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-36040
Jul 26, 2026
Merged

kubaflo merged 12 commits into
dotnet:inflight/currentfrom
devanathan-vaithiyanathan:fix-36040

Conversation

@devanathan-vaithiyanathan

Copy link
Copy Markdown
Contributor

Note

Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Issue Details

Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen:

  • A 32px strip at the top of the modal page shows the page underneath (title bar height gap)
  • The top ~32px of the modal page does not respond to mouse clicks

Root Cause

NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar — so this reservation is wrong for modal pages.

Description of Change

In ModalNavigationManager.Windows.cs, when pushing a modal, check if the presenter is FullScreen and call windowManager.SetTitleBarVisibility(false) and also handled the runtime presented changes.

Issues Fixed

Fixes #36040

Tested the behavior in the following platforms.

  • Android
  • Windows
  • iOS
  • Mac
Before After
Windows
Mac

@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36209

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36209"

@Tamilarasan-Paranthaman Tamilarasan-Paranthaman added the community ✨ Community Contribution label Jun 29, 2026
@dotnet-policy-service dotnet-policy-service Bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jun 29, 2026
@sheiksyedm
sheiksyedm marked this pull request as ready for review June 30, 2026 06:55
Copilot AI review requested due to automatic review settings June 30, 2026 06:55

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes Windows full-screen modal presentation issues where a modal page incorrectly reserves title-bar space (creating a ~32px visual gap and an unclickable region) by adjusting title bar visibility handling for modal navigation roots and adding targeted Windows device tests.

Changes:

  • Suppress modal NavigationRootManager title-bar reservation when the host window is in AppWindowPresenterKind.FullScreen.
  • Subscribe to presenter changes so entering/exiting full-screen while a modal is visible updates the top modal’s title-bar state.
  • Add Windows device tests to validate full-screen (no reservation) and windowed (reservation preserved) modal behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs Updates modal push/pop behavior and tracks presenter changes to toggle title-bar reservation in full-screen.
src/Controls/tests/DeviceTests/Elements/Modal/ModalTests.Windows.cs Adds Windows device tests covering full-screen and windowed modal title-bar reservation behavior.

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jul 5, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — 2 findings

See inline comments for details.

@MauiBot MauiBot added s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review) labels Jul 5, 2026
MauiBot

This comment was marked as outdated.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jul 23, 2026
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — 1 findings

See inline comments for details.

// mode there are no OS window controls to avoid, so suppress this reservation.
// This also clears the InputNonClientPointerSource passthrough regions, fixing
// the unclickable top area that would otherwise remain in full-screen mode.
if (IsWindowFullScreen())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 AI-Generated Review (multi-model)

[major] Logic and Correctness — The initial modal push only clears the modal title-bar reservation in full-screen mode. If an app has Window.TitleBar = new TitleBar { IsVisible = false } and pushes a modal while windowed, the modal NavigationRootManager constructor still reserves the 32px title-bar area; SetTitleBar(titlebar, modalContext) does not apply the initial IsVisible=false, and the later pop/presenter-change paths already treat hidden title bars as showTitleBar=false. Please use the same visibility predicate here and cover that initial-push case.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jul 24, 2026
kubaflo pushed a commit that referenced this pull request Jul 24, 2026
Two PRs showed an unclear gate outcome:
- #36109 (iOS): the gate exited without a report and the fallback showed only
  the alarming, generic 'verify-tests-fail.ps1 exited before writing a
  verification report. Exit code: 3' with no root cause or next step.
- #36209 (Windows): the report had bare '⚠️ ENV ERROR' cells ('result XML
  empty or not valid — app likely crashed') but no classification explaining
  it was infrastructure, not a test/PR failure.

Fixes:
1. Review-PR.ps1 no-report fallback is now exit-code/log aware: distinct,
   honest lead-ins for simulator-boot failure, app-crash/empty-result-file,
   app-launch failure, and exit-code-3 INCONCLUSIVE — each says it is transient
   infra, not the PR, and to comment /review to retry.
2. verify-tests-fail.ps1 full A/B report: add a classification branch for the
   env-error INCONCLUSIVE case (previously skipped by the -not $hasEnvError
   guard, leaving no explanation) that states the cause and next step.

Also drops the stale '/review rerun' phrasing (functionality removed) in favour
of '/review'. Parse-checked both scripts.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 15d2af20-e4ab-4e88-9011-cfbd83513bc0
MauiBot

This comment was marked as outdated.

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expert Review — 1 findings

See inline comments for details.

// mode there are no OS window controls to avoid, so suppress this reservation.
// This also clears the InputNonClientPointerSource passthrough regions, fixing
// the unclickable top area that would otherwise remain in full-screen mode.
if (IsWindowFullScreen())

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 AI-Generated Review (multi-model)

[major] Windows modal/title-bar handling — This initial push path only suppresses the modal title-bar reservation for full-screen windows, but the pop and presenter-change paths also honor Window.TitleBar.IsVisible. In a windowed app that sets Window.TitleBar = new TitleBar { IsVisible = false } before pushing a modal, the new modal NavigationRootManager keeps the constructor default 32px reservation because this condition is false and no later call clears it. Please compute the same showTitleBar = !IsWindowFullScreen() && ((_window.TitleBar as TitleBar)?.IsVisible ?? true) value here and call windowManager.SetTitleBarVisibility(showTitleBar) before wiring the modal title bar.

Copilot AI review requested due to automatic review settings July 24, 2026 09:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.

Comments suppressed due to low confidence (2)

src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs:44

  • The comment mentions “activity recreation on Windows”, but Windows doesn’t have an Activity lifecycle; this is describing WinUI window/handler recreation. Updating the wording would avoid confusion and make the intent clearer.
			// When the WinUI window handler is recreated (e.g., activity recreation on Windows),
			// the AppWindow instance may change. Clear the subscription to the old AppWindow so
			// that SubscribeToPresenterChanges() can attach to the new one when the modal stack
			// is resynced after the handler is reconnected.

src/Controls/tests/DeviceTests/Elements/Modal/ModalTests.Windows.cs:320

  • This assertion compares against AppTitleBarContainer?.Visibility, but AppTitleBarContainer can be null until the template is applied; that would make the test fail for reasons unrelated to the behavior under test. Use WindowTitleBarContentControlMinHeight > 0 (the reserved title bar height) as the signal instead.
					// In windowed mode, the modal's title bar container must remain visible.
					// The fix must not affect this path.
					Assert.Equal(
						UI.Xaml.Visibility.Visible,
						modalWindowRootView.AppTitleBarContainer?.Visibility);

@kubaflo

This comment has been minimized.

@github-actions github-actions Bot added the s/agent-review-in-progress AI review is currently running for this PR label Jul 24, 2026

@MauiBot MauiBot left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Review Summary

@devanathan-vaithiyanathan — new AI review results are available based on this last commit: a902458.

Gate Inconclusive Confidence Low Platform Windows


🗂️ Review Sessions — click to expand
🚦 Gate — Test Before & After Fix

Gate Result: ⚠️ INCONCLUSIVE

Platform: WINDOWS · Base: main · Merge base: faa6d916

🩺 Could not verify — environment/infrastructure error. The gate ran the tests but hit an environment error (the test app crashed or exited before writing its results, an emulator/simulator/Appium/XHarness flake, or an empty/invalid result file), so it could not record a real pass/fail. The ⚠️ ENV ERROR marks below are infrastructure, not test failures — this is not a problem with your PR. Comment /review to retry on a fresh agent.

Windows device test result file 'artifacts\log\TestResults-Microsoft_Maui_Controls_DeviceTests_Modal.xml' is empty or not valid XML (the device-test app likely crashed or exited before writing results).

Test Without Fix (expect FAIL) With Fix (expect PASS)
📱 ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible) Category=Modal ⚠️ ENV ERROR ⚠️ ENV ERROR
🔴 Without fix — 📱 ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible): ⚠️ ENV ERROR · 357s

No log file found

🟢 With fix — 📱 ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible): ⚠️ ENV ERROR · 188s

No log file found

⚠️ Failure Details

  • ⚠️ ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible) without fix: Windows device test result file 'artifacts\log\TestResults-Microsoft_Maui_Controls_DeviceTests_Modal.xml' is empty or not valid XML (the device-test app likely crashed or exited before writing results).
  • ⚠️ ModalTests (ModalPageInFullScreenModeHasNoTitleBarReservation, ModalPageInWindowedModeRetainsTitleBarState, ModalTitleBarUpdatesWhenPresenterChangesWhileModalIsVisible) with fix: Windows device test result file 'artifacts\log\TestResults-Microsoft_Maui_Controls_DeviceTests_Modal.xml' is empty or not valid XML (the device-test app likely crashed or exited before writing results).
📁 Fix files reverted (1 files)
  • src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs

📱 UI Tests — Navigation

Detected UI test categories: Navigation

✅ Deep UI tests — 80 passed, 0 failed across 1 category on platform-pool agent (replaces in-process counts above).

🧪 UI Test Execution Results (deep, platform pool)

Category Tests Snapshot diffs
Navigation 80/82 ✓ —
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)

📋 Pre-Flight — Context & Validation

Issue: #36040 - Windows modal pages leave title-bar space / hit-test gap in full-screen mode
PR: #36209 - Fix Windows modal title-bar reservation in full-screen mode
Platforms Affected: Windows
Files Changed: 1 implementation, 1 test

Key Findings

  • Local diff changes src/Controls/src/Core/Platform/ModalNavigationManager/ModalNavigationManager.Windows.cs and src/Controls/tests/DeviceTests/Elements/Modal/ModalTests.Windows.cs.
  • PR approach fixes the modal-specific symptom in ModalNavigationManager: suppress reservation on modal push/pop, subscribe to AppWindow.Changed for presenter changes, and add Windows Controls device tests.
  • GitHub CLI is unauthenticated and public REST/web access is rate-limited/blocked, so pre-flight issue/PR narrative is reconstructed from local diff and prior code-review output.
  • Impacted test area: Controls DeviceTests, Modal/Navigation on Windows.

Code Review Summary

Verdict: NEEDS_DISCUSSION
Confidence: low
Errors: 0 | Warnings: 1 | Suggestions: 1

Key code review findings:

  • ⚠ Hidden TitleBar.IsVisible=false behavior lacks direct regression coverage in ModalTests.Windows.cs.
  • ℹ Deduplicate the repeated title-bar visibility predicate in ModalNavigationManager.Windows.cs.

Fix Candidates

# Source Approach Test Result Files Changed Notes
PR PR #36209 Modal manager suppresses modal title-bar reservation in full-screen/hidden-titlebar states and updates on AppWindow.Changed. ⚠️ INCONCLUSIVE (Gate) ModalNavigationManager.Windows.cs, ModalTests.Windows.cs Original PR; gate was already inconclusive and was not rerun.

🔬 Code Review — Deep Analysis

Code Review — PR #36209

Independent Assessment

What this changes: Windows modal navigation suppresses a modal NavigationRootManager title-bar reservation when the host window is full-screen or the MAUI TitleBar is hidden, and subscribes to AppWindow.Changed while modals are visible to update that reservation on presenter changes.
Inferred motivation: Modal pages were leaving a 32px title-bar gap / non-client hit-test region at the top in Windows full-screen mode.

Reconciliation with PR Narrative

Author claims: Fixes #36040 by clearing modal title-bar space in full-screen and handling runtime presenter changes.
Agreement/disagreement: Matches the code. The implementation also covers hidden Window.TitleBar.IsVisible == false.

Prior Review Reconciliation

Prior ❌ Error Finding Source Status Evidence
AppWindow.Changed UI updates off UI thread MauiBot [critical] ✅ Fixed Uses captured DispatcherQueue and dispatches before modal/WinUI state access.
Handler recreation leaves old AppWindow.Changed subscription MauiBot [major] ✅ Fixed HandlerChanging unsubscribes when OldHandler exists.
Popping last modal in full-screen leaves root title-bar visuals collapsed MauiBot [major] ✅ Fixed Pop path keeps root visual containers visible and only adjusts reservation height.
Hidden MAUI TitleBar not preserved on pop/presenter change MauiBot [major] ✅ Fixed Predicate includes TitleBar.IsVisible.
Initial modal push ignores hidden TitleBar MauiBot [major] ✅ Fixed Push path uses same predicate.

Blast Radius Assessment

  • Runs for all instances: No — active behavior applies to Windows modal push/pop and presenter changes while a modal is visible.
  • Startup impact: Low — event handlers register during manager initialization, but title-bar mutation happens only during modal/presenter events.
  • Static/shared state: No static state; instance event subscription is cleaned up on last modal pop, destroying, and handler changing.

CI Status

  • Required-check result: tool-unavailable/undetermined because GitHub CLI is unauthenticated in this environment.
  • Classification: undetermined for required checks.
  • Action taken: capped confidence at low and did not use LGTM.

Findings

⚠️ Warning — Hidden TitleBar.IsVisible=false behavior lacks direct regression coverage

The production code combines full-screen state with ((_window.TitleBar as TitleBar)?.IsVisible ?? true) on push, pop, and presenter-change paths. The new tests exercise full-screen/default-titlebar behavior but not a windowed app with window.TitleBar = new TitleBar { IsVisible = false }.

💡 Suggestion — Deduplicate the title-bar visibility predicate

The same title-bar visibility rule appears in three places. Extracting a helper would reduce future drift, especially because prior review findings depended on all paths agreeing.

Failure-Mode Probing

  • Full-screen before modal push: showTitleBarOnPush becomes false and clears the modal reservation.
  • Presenter changes while modal is visible: subscribed on first modal push, dispatched to UI thread, rechecks modal count, updates top modal.
  • Last modal popped while still full-screen: root containers remain visible while reservation height is set to 0.
  • Handler recreation: HandlerChanging unsubscribes from the old AppWindow; shared manager clears platform modal pages.

Verdict: NEEDS_DISCUSSION

Confidence: low
Summary: Code issues previously flagged as critical/major appear addressed, and no new blocking correctness bug was found. Required-check status could not be verified through authenticated gh; remaining concern is a hidden-titlebar test coverage gap.


📝 Recommended PR Title & Description

Assessment: ✏️ Recommend updating — the current description is accurate but has two fix-description issues: it says "and also handled the runtime presented changes" instead of "presenter changes", and the Before/After table labels the Windows after screenshot as Mac.

Recommended title

[Windows] ModalNavigation: Fix full-screen title-bar gap

Recommended description

### Issue Details
Two bugs when pushing a modal page while the app is in AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath (title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title bar (because ExtendsContentIntoTitleBar defaults to true). In full-screen mode there's no OS title bar, so this reservation is wrong for modal pages.

### Description of Change
In ModalNavigationManager.Windows.cs, when pushing a modal, check whether the presenter is FullScreen or the app's TitleBar is hidden and call windowManager.SetTitleBarVisibility(false) so the modal does not reserve title-bar height or leave a non-client hit-test gap.

The fix also subscribes to AppWindow.Changed while a modal is visible so runtime presenter changes update the top modal's title-bar reservation, and unsubscribes when the modal stack is cleared, the window is destroyed, or the window handler changes.

Windows device tests were added for:
* Pushing a modal while already in full-screen mode
* Keeping windowed modal title-bar behavior unchanged
* Updating the modal title-bar reservation when the presenter changes while the modal is visible

### Issues Fixed
Fixes #36040

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac

| Before  | After  |
|---------|--------|
| **Windows**<br> <img src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf" width="600" height="300"> | **Windows**<br> <img src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f" width="600" height="300"> |

🏁 Report — Final Recommendation

Comparative Candidate Report — PR #36209

Available candidates

Candidate Source Regression status Assessment Rank
pr Submitted PR fix ⚠️ Inconclusive due to environment error Correctly fixes the Windows full-screen modal title-bar reservation and hit-test gap, handles runtime presenter changes, and includes targeted Windows device tests. No expert inline findings. 1
pr-plus-reviewer PR fix plus expert-reviewer polish ⚠️ Inconclusive due to environment error Adds only non-blocking improvements: hidden-titlebar regression coverage and/or predicate deduplication. Useful polish, but not a materially safer fix than the submitted PR because no blocking issue was found. 2

No try-fix summary or try-fix-N/content.md artifacts were present under CustomAgentLogsTmp/PRState/36209/PRAgent, so there are no STEP 5a try-fix candidates available to compare. No candidate is recorded as having failed regression tests; the gate result is explicitly inconclusive because of an environment/test-result XML error and is not treated as a failing fix.

Winning candidate

Winner: pr

The raw PR fix wins because it directly addresses the reported Windows full-screen modal bug while preserving modal navigation lifecycle safety. The expert reviewer found no actionable inline defects, and the only reviewer feedback is optional coverage/refactoring polish that does not justify replacing the submitted fix.


🧭 Next Steps — review latest findings

No alternative fix was selected for this run. Review the session findings and CI results before merging.

@MauiBot MauiBot removed the s/agent-review-in-progress AI review is currently running for this PR label Jul 25, 2026
@kubaflo
kubaflo changed the base branch from main to inflight/current July 26, 2026 09:44
@kubaflo
kubaflo merged commit 1b0a13b into dotnet:inflight/current Jul 26, 2026
22 of 31 checks passed
@github-actions github-actions Bot added this to the .NET 10 SR10 milestone Jul 26, 2026
kubaflo pushed a commit that referenced this pull request Jul 28, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
kubaflo pushed a commit that referenced this pull request Jul 29, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
kubaflo pushed a commit that referenced this pull request Aug 7, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
kubaflo pushed a commit that referenced this pull request Aug 12, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
@sheiksyedm sheiksyedm modified the milestones: .NET 10 SR10, .NET 10 SR11 Aug 26, 2026
kubaflo pushed a commit that referenced this pull request Aug 27, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
kubaflo pushed a commit that referenced this pull request Sep 2, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
kubaflo pushed a commit that referenced this pull request Sep 3, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
kubaflo pushed a commit that referenced this pull request Sep 3, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
kubaflo pushed a commit that referenced this pull request Sep 4, 2026
…screen mode (#36209)

<!-- Please let the below note in for people that find this PR -->
> [!NOTE]
> Are you waiting for the changes in this PR to be merged?
> It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

### Issue Details
Two bugs when pushing a modal page while the app is in
AppWindowPresenterKind.FullScreen:
* A 32px strip at the top of the modal page shows the page underneath
(title bar height gap)
* The top ~32px of the modal page does not respond to mouse clicks

### Root Cause
NavigationRootManager's constructor always reserves 32px for the title
bar (because ExtendsContentIntoTitleBar defaults to true). In
full-screen mode there's no OS title bar — so this reservation is wrong
for modal pages.

### Description of Change

<!-- Enter description of the fix in this section -->
In ModalNavigationManager.Windows.cs, when pushing a modal, check if the
presenter is FullScreen and call
windowManager.SetTitleBarVisibility(false) and also handled the runtime
presented changes.

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes #36040 

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

**Tested the behavior in the following platforms.**
- [ ] Android
- [x] Windows
- [ ] iOS
- [ ] Mac


| Before  | After  |
|---------|--------|
| **Windows**<br> <img
src="https://github.com/user-attachments/assets/403ef318-205c-4bd7-a239-dbeef2c1bbcf"
width="600" height="300"> | **Mac**<br> <img
src="https://github.com/user-attachments/assets/ddd3c878-0141-40b1-b2c9-fbd23ecccb5f"
width="600" height="300"> |
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-navigation NavigationPage community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration platform/windows s/agent-changes-requested AI agent recommends changes - found a better alternative or issues s/agent-fix-pr-picked AI could not beat the PR fix - PR is the best among all candidates s/agent-reviewed PR was reviewed by AI agent workflow (full 4-phase review)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[.NET 10, Windows] Modal page has a 32px title bar gap at the top in full-screen mode, with an unclickable non-client area

6 participants